home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / status / info < prev    next >
Encoding:
Text File  |  1993-10-26  |  6.9 KB  |  140 lines  |  [TEXT/$Tcl]

  1.  
  2.           info option ?arg arg ...?
  3.  
  4.  
  5.      DESCRIPTION
  6.           This command provides information about various internals of
  7.           the  Tcl  interpreter.   The  legal  option's  (which may be
  8.           abbreviated) are:
  9.  
  10.           info args procname
  11.                Returns a list containing the names of the arguments to
  12.                procedure  procname,  in  order.   Procname must be the
  13.                name of a Tcl command procedure.
  14.  
  15.           info body procname
  16.                Returns the body of procedure procname.  Procname  must
  17.                be the name of a Tcl command procedure.
  18.  
  19.           info cmdcount
  20.                Returns a count of the total number  of  commands  that
  21.                have been invoked in this interpreter.
  22.  
  23.           info commands ?pattern?
  24.                If pattern isn't specified, returns a list of names  of
  25.                all  the Tcl commands, including both the built-in com-
  26.                mands written in C and the command  procedures  defined
  27.                using  the proc command.  If pattern is specified, only
  28.                those names matching pattern are returned.  Matching is
  29.                determined using the same rules as for string match.
  30.  
  31.           info complete command
  32.                Returns 1 if command is a complete Tcl command  in  the
  33.                sense of having no unclosed quotes, braces, brackets or
  34.                array element names, If the command doesn't  appear  to
  35.                be  complete then 0 is returned.  This command is typi-
  36.                cally used in line-oriented input environments to allow
  37.                users to type in commands that span multiple lines;  if
  38.                the  command  isn't  complete,  the  script  can  delay
  39.                evaluating it until additional lines have been typed to
  40.                complete the command.
  41.  
  42.           info default procname arg varname
  43.                Procname must be the name of a  Tcl  command  procedure
  44.                and  arg  must  be the name of an argument to that pro-
  45.                cedure.  If arg doesn't have a default value  then  the
  46.                command  returns  0.  Otherwise it returns 1 and places
  47.                the default value of arg into variable varname.
  48.  
  49.           info exists varName
  50.                Returns 1 if the variable named varName exists  in  the
  51.                current context (either as a global or local variable),
  52.                returns 0 otherwise.
  53.  
  54.           info globals ?pattern?
  55.                If pattern isn't specified, returns a list of  all  the
  56.                names  of  currently-defined global variables.  If pat-
  57.                tern is specified, only those  names  matching  pattern
  58.                are  returned.   Matching  is determined using the same
  59.                rules as for string match.
  60.  
  61.           info level ?number?
  62.                If number is not  specified,  this  command  returns  a
  63.                number  giving  the  stack  level  of the invoking pro-
  64.                cedure, or 0 if the command is  invoked  at  top-level.
  65.                If  number is specified, then the result is a list con-
  66.                sisting of the name and  arguments  for  the  procedure
  67.                call  at level number on the stack.  If number is posi-
  68.                tive then it selects a particular stack level (1 refers
  69.                to the top-most active procedure, 2 to the procedure it
  70.                called, and so on); otherwise it gives a level relative
  71.                to  the  current  level  (0  refers to the current pro-
  72.                cedure, -1 to its caller, and so on).  See the  uplevel
  73.                command for more information on what stack levels mean.
  74.  
  75.           info library
  76.                Returns the name of  the  library  directory  in  which
  77.                standard Tcl scripts are stored.  The default value for
  78.                the library is compiled into Tcl, but it may  be  over-
  79.                ridden by setting the TCL_LIBRARY environment variable.
  80.                If there is no TCL_LIBRARY variable and no  compiled-in
  81.                value  then  and  error  is generated.  See the library
  82.                manual entry for details of the facilities provided  by
  83.                the Tcl script library.  Normally each application will
  84.                have its own  application-specific  script  library  in
  85.                addition  to  the  Tcl  script library;  I suggest that
  86.                each application set a global variable with a name like
  87.                $app_library  (where  app is the application's name) to
  88.                hold the location of that application's library  direc-
  89.                tory.
  90.  
  91.           info locals ?pattern?
  92.                If pattern isn't specified, returns a list of  all  the
  93.                names  of  currently-defined local variables, including
  94.                arguments to the current procedure, if any.   Variables
  95.                defined  with the global and upvar commands will not be
  96.                returned.  If pattern is specified,  only  those  names
  97.                matching  pattern are returned.  Matching is determined
  98.                using the same rules as for string match.
  99.  
  100.           info patchlevel
  101.                Returns a decimal  integer  giving  the  current  patch
  102.                level for Tcl.  The patch level is incremented for each
  103.                new release or patch, and  it  uniquely  identifies  an
  104.                official version of Tcl.
  105.  
  106.           info procs ?pattern?
  107.                If pattern isn't specified, returns a list of  all  the
  108.                names  of Tcl command procedures.  If pattern is speci-
  109.                fied, only those names matching pattern  are  returned.
  110.                Matching  is  determined  using  the  same rules as for
  111.                string match.
  112.  
  113.           info script
  114.                If a Tcl script file is currently being evaluated (i.e.
  115.                there  is  a call to Tcl_EvalFile active or there is an
  116.                active invocation of the  source  command),  then  this
  117.                command  returns  the  name of the innermost file being
  118.                processed.  Otherwise  the  command  returns  an  empty
  119.                string.
  120.  
  121.           info tclversion
  122.                Returns the version number for this version of  Tcl  in
  123.                the  form  x.y,  where  changes  to  x  represent major
  124.                changes with probable incompatibilities and changes  to
  125.                y  represent  small  enhancements  and  bug  fixes that
  126.                retain backward compatibility.
  127.  
  128.           info vars ?pattern?
  129.                If pattern isn't specified, returns a list of  all  the
  130.                names  of  currently-visible  variables, including both
  131.                locals and currently-visible globals.   If  pattern  is
  132.                specified,   only  those  names  matching  pattern  are
  133.                returned.  Matching is determined using the same  rules
  134.                as for string match.
  135.  
  136.  
  137.      KEYWORDS
  138.           command, information, interpreter, level,  procedure,  vari-
  139.           able
  140.